package com.wuqi.dev.designdemo;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

/**
 * Created by Risky57 on 2017/4/28.
 */

public class HeaderAdapter extends RecyclerView.Adapter{

    private static final int TYPE = 123445;

    private RecyclerView.Adapter mAdapter;

    public HeaderAdapter (RecyclerView.Adapter adapter) {
        mAdapter = adapter;
    }

    @Override
    public int getItemViewType (int position) {
        if (position == 0){
            return TYPE;
        }else{
            return mAdapter.getItemViewType(position - 1);
        }
    }

    public void addHeader(View view){

    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder (ViewGroup parent, int viewType) {



        return null;
    }

    @Override
    public void onBindViewHolder (RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount () {
        return mAdapter.getItemCount() + 1;
    }
}
